<?php
// 获得病例信息
// header("content-type:text/html;charset=UTF-8");
include_once("conn.php");

if(!isset($_GET["casesid"])){
    die("<script>alert('传递参数失败！');history.go(-1);</script>");
}else{
    $cases = $_GET["casesid"];
}

$select_cases = "SELECT * FROM cases_infos WHERE cases_ID = '" . $cases . "'";
$result_cases = mysqli_query($connect_DB, $select_cases);

if($result_cases){
    $row_cases = mysqli_fetch_object($result_cases);
    $select_order = "SELECT * FROM order_history_infos WHERE order_ID = '" . $row_cases->cases_ID . "'";
    $result_order = mysqli_query($connect_DB, $select_order);
    if($result_order){
        $row_order = mysqli_fetch_object($result_order);
        echo"
        <div class='cases-con-top'>
            <p><span>宠物昵称：</span>".$row_cases->cases_petName."</p>
            <p><span>服务类别：</span>".$row_cases->cases_orderType."</p>
        </div>
        <div class='cases-con-top'>
            <p><span>上传医生：</span>".$row_cases->cases_docName."</p>
            <p><span>上传日期：</span>".$row_cases->cases_date."</p>
        </div>
        <div class='cases-cons'>
            预约留言：".$row_order->order_Remark."
        </div>
        <div class='cases-cons'>
            诊断结果：".$row_cases->cases_result."
        </div>
        <div class='cases-cons'>
            处理方式：".$row_cases->cases_deal."
        </div>";
    }else{
        echo"查询失败".$result_order;
    }
}else{
    echo"查询失败".$result_cases;
}

?>